GtkScrolledWindow: Check proximity on both indicators on grab-end leave events
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 14 Mar 2016 18:13:05 +0000 (19:13 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 14 Mar 2016 18:18:14 +0000 (19:18 +0100)
The implicit grab may be finished so the pointer lies on top of the other
scrollbar, in this case one scrollbar should lose the hovering state, and
the other should gain it. So we must check for proximity in both indicators.

gtk/gtkscrolledwindow.c

index f9fa7ea011d086b44bbd2b5b2582043115c741cc..2d29d6509e90e1c902808ccc5a0abdf1ae745944 100644 (file)
@@ -1376,10 +1376,8 @@ captured_event_cb (GtkWidget *widget,
   else if (event->type == GDK_LEAVE_NOTIFY && on_scrollbar &&
            event->crossing.mode == GDK_CROSSING_UNGRAB)
     {
-      if (event_widget == priv->hindicator.scrollbar)
-        check_update_scrollbar_proximity (sw, &priv->hindicator, event);
-      else if (event_widget == priv->vindicator.scrollbar)
-        check_update_scrollbar_proximity (sw, &priv->vindicator, event);
+      check_update_scrollbar_proximity (sw, &priv->vindicator, event);
+      check_update_scrollbar_proximity (sw, &priv->hindicator, event);
     }
 
   return GDK_EVENT_PROPAGATE;